package com.dragon.queue;

/**
 * 数组队列的测试
 *
 * @author dragon
 * @since 2019/11/19
 */
public class ArrayQueueTest {

    public static void main(String[] args) {
        ArrayQueue arrayQueue = new ArrayQueue();
        arrayQueue.enqueue(1);
        arrayQueue.enqueue(2);
        arrayQueue.showQueue();
        System.out.println("队列元素个数:" + arrayQueue.size());
        System.out.println("队列队首元素:" + arrayQueue.peek());
        arrayQueue.dequeue();
        arrayQueue.showQueue();
        System.out.println("队列元素个数:" + arrayQueue.size());
        System.out.println("队列队首元素:" + arrayQueue.peek());
        arrayQueue.dequeue();
        arrayQueue.showQueue();
        System.out.println("队列元素个数:" + arrayQueue.size());
        System.out.println("队列队首元素:" + arrayQueue.peek());
    }

}
